package com.example.demo111111.service.impl;

import com.example.demo111111.dao.BookDao;
import com.example.demo111111.entity.Book;
import com.example.demo111111.service.BookService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookServiceImpl implements BookService {
    @Resource
    private  BookDao bookDao;


    @Override
    public Boolean addBook(Book book) {
       Boolean result= bookDao.insert(book);
        return result;
    }

    @Override
    public List<Book> findAllBook() {
        List<Book> bookList=bookDao.selectAllBook();
        return bookList;
    }
}
